<%--
  Created by IntelliJ IDEA.
  User: 瑱彬
  Date: 2015/5/27
  Time: 14:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% String context = request.getContextPath(); %>
<html>
<head>

    <title>用户-${author.name}</title>
</head>
<body>
<c:choose>
<c:when test="${username != ''}">
  <a href="#">${username}</a>
  <a href="<%=context%>/user/logout">退出</a>
</c:when>
<c:otherwise>
  <a href="<%=context%>/login">登录</a>
  <a href="<%=context%>/register">注册</a>
</c:otherwise>
</c:choose>

<br/>
<h1>${author.name}</h1>
<br/>

<ul>
  <c:forEach items="${list}" var="item">
    <li>
      作者：${item.author}<br />
      标题：<a href="<%=context%>/content?b=${item.id}">${item.title}</a><br/>
      分类：<a href="<%=context%>/category?cat=${item.catid}">${item.catName}</a><br/>
      时间：${item.addTime}<br/>
      简介：${item.bcontent}<br />
      缩略图：${item.thumb}<br />
      <br /><br />
    </li>
  </c:forEach>
</ul>
<br/>
${pageNavigation}<br />
</body>
</html>
